Skip to content

Show how long ago each download permission was first granted - #54

Merged
kf8a merged 1 commit into
masterfrom
feature/permission-granted-age
Nov 3, 2026
Merged

kf8a merged 1 commit into
masterfrom
feature/permission-granted-age

Conversation

@kf8a

@kf8a kf8a commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Summary

The per-datatable permissions page (/permissions/:id, "People with access") gets a First granted column, between "Granted by" and "Access until", reading for example "3 months ago". The exact date shows on hover (and is in a <time datetime> attribute).

  • It comes from permissions.created_at. Extending a permission updates the same row, so this stays the date access was first given, while "Granted by" shows whoever granted or extended it most recently.
  • Permissions saved without a creation date show nothing.
  • No migration.

Testing

  • spec/requests/permissions_spec.rb: the datatable page shows "3 months ago" for a permission created three months ago.
  • Full suite: 307 examples, 0 failures, 3 pending. Run against the schema.rb before 7f502da, since master's current schema can't be loaded into a fresh database (see the structure.sql PR Dump the database schema as db/structure.sql #53).

Generated by Claude Code

The datatable's permissions page gets a "First granted" column ("3 months
ago", with the date on hover), from permissions.created_at. Extending a
permission keeps the same row, so this is when access was first given;
older rows without a creation date show nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AR3uoZS1uCC8hXmojk3K7
@kf8a
kf8a merged commit cec298d into master Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants